<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/boost/algorithm/string/detail/classification.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../../index.html">top level</a> - <a href="index.html">usr/include/boost/algorithm/string/detail</a> - classification.hpp<span style="font-size: 80%;"> (source / <a href="classification.hpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">18</td>
            <td class="headerCovTableEntry">29</td>
            <td class="headerCovTableEntryLo">62.1 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:50:33</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">3</td>
            <td class="headerCovTableEntry">4</td>
            <td class="headerCovTableEntryMed">75.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : //  Boost string_algo library classification.hpp header file  ---------------------------//</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : //  Copyright Pavol Droba 2002-2003.
<span class="lineNum">       4 </span>            : // 
<span class="lineNum">       5 </span>            : // Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       6 </span>            : //    (See accompanying file LICENSE_1_0.txt or copy at
<span class="lineNum">       7 </span>            : //          http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       8 </span>            : 
<span class="lineNum">       9 </span>            : //  See http://www.boost.org/ for updates, documentation, and revision history.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : #ifndef BOOST_STRING_CLASSIFICATION_DETAIL_HPP
<span class="lineNum">      12 </span>            : #define BOOST_STRING_CLASSIFICATION_DETAIL_HPP
<span class="lineNum">      13 </span>            : 
<span class="lineNum">      14 </span>            : #include &lt;boost/algorithm/string/config.hpp&gt;
<span class="lineNum">      15 </span>            : #include &lt;algorithm&gt;
<span class="lineNum">      16 </span>            : #include &lt;functional&gt;
<span class="lineNum">      17 </span>            : #include &lt;locale&gt;
<span class="lineNum">      18 </span>            : 
<span class="lineNum">      19 </span>            : #include &lt;boost/range/begin.hpp&gt;
<span class="lineNum">      20 </span>            : #include &lt;boost/range/end.hpp&gt;
<span class="lineNum">      21 </span>            : 
<span class="lineNum">      22 </span>            : #include &lt;boost/algorithm/string/predicate_facade.hpp&gt;
<span class="lineNum">      23 </span>            : #include &lt;boost/type_traits/remove_const.hpp&gt;
<span class="lineNum">      24 </span>            : 
<span class="lineNum">      25 </span>            : namespace boost {
<span class="lineNum">      26 </span>            :     namespace algorithm {
<span class="lineNum">      27 </span>            :         namespace detail {
<span class="lineNum">      28 </span>            : 
<span class="lineNum">      29 </span>            : //  classification functors -----------------------------------------------//
<span class="lineNum">      30 </span>            : 
<span class="lineNum">      31 </span>            :    // is_classified functor
<span class="lineNum">      32 </span><span class="lineNoCov">          0 :             struct is_classifiedF :</span>
<span class="lineNum">      33 </span>            :                 public predicate_facade&lt;is_classifiedF&gt;
<span class="lineNum">      34 </span>            :             {
<span class="lineNum">      35 </span>            :                 // Boost.ResultOf support
<span class="lineNum">      36 </span>            :                 typedef bool result_type;
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            :                 // Constructor from a locale
<span class="lineNum">      39 </span>            :                 is_classifiedF(std::ctype_base::mask Type, std::locale const &amp; Loc = std::locale()) :
<span class="lineNum">      40 </span><span class="lineNoCov">          0 :                     m_Type(Type), m_Locale(Loc) {}</span>
<span class="lineNum">      41 </span>            :                 // Operation
<span class="lineNum">      42 </span>            :                 template&lt;typename CharT&gt;
<span class="lineNum">      43 </span>            :                 bool operator()( CharT Ch ) const
<span class="lineNum">      44 </span>            :                 {
<span class="lineNum">      45 </span><span class="lineNoCov">          0 :                     return std::use_facet&lt; std::ctype&lt;CharT&gt; &gt;(m_Locale).is( m_Type, Ch );</span>
<span class="lineNum">      46 </span>            :                 }
<span class="lineNum">      47 </span>            : 
<span class="lineNum">      48 </span>            :                 #if defined(__BORLANDC__) &amp;&amp; (__BORLANDC__ &gt;= 0x560) &amp;&amp; (__BORLANDC__ &lt;= 0x582) &amp;&amp; !defined(_USE_OLD_RW_STL)
<span class="lineNum">      49 </span>            :                     template&lt;&gt;
<span class="lineNum">      50 </span>            :                     bool operator()( char const Ch ) const
<span class="lineNum">      51 </span>            :                     {
<span class="lineNum">      52 </span>            :                         return std::use_facet&lt; std::ctype&lt;char&gt; &gt;(m_Locale).is( m_Type, Ch );
<span class="lineNum">      53 </span>            :                     }
<span class="lineNum">      54 </span>            :                 #endif
<span class="lineNum">      55 </span>            : 
<span class="lineNum">      56 </span>            :             private:
<span class="lineNum">      57 </span>            :                 std::ctype_base::mask m_Type;
<span class="lineNum">      58 </span>            :                 std::locale m_Locale;
<span class="lineNum">      59 </span>            :             };
<span class="lineNum">      60 </span>            : 
<span class="lineNum">      61 </span>            : 
<span class="lineNum">      62 </span>            :             // is_any_of functor
<span class="lineNum">      63 </span>            :             /*
<span class="lineNum">      64 </span>            :                 returns true if the value is from the specified set
<span class="lineNum">      65 </span>            :             */
<span class="lineNum">      66 </span>            :             template&lt;typename CharT&gt;
<span class="lineNum">      67 </span>            :             struct is_any_ofF :
<span class="lineNum">      68 </span>            :                 public predicate_facade&lt;is_any_ofF&lt;CharT&gt; &gt;
<span class="lineNum">      69 </span>            :             {
<span class="lineNum">      70 </span>            :             private:
<span class="lineNum">      71 </span>            :                 // set cannot operate on const value-type
<span class="lineNum">      72 </span>            :                 typedef typename ::boost::remove_const&lt;CharT&gt;::type set_value_type;
<span class="lineNum">      73 </span>            : 
<span class="lineNum">      74 </span>            :             public:     
<span class="lineNum">      75 </span>            :                 // Boost.ResultOf support
<span class="lineNum">      76 </span>            :                 typedef bool result_type;
<span class="lineNum">      77 </span>            : 
<a name="78"><span class="lineNum">      78 </span>            :                 // Constructor</a>
<span class="lineNum">      79 </span>            :                 template&lt;typename RangeT&gt;
<span class="lineNum">      80 </span><span class="lineCov">          1 :                 is_any_ofF( const RangeT&amp; Range ) : m_Size(0)</span>
<span class="lineNum">      81 </span>            :                 {
<span class="lineNum">      82 </span>            :                     // Prepare storage
<span class="lineNum">      83 </span><span class="lineCov">          1 :                     m_Storage.m_dynSet=0;</span>
<span class="lineNum">      84 </span>            : 
<span class="lineNum">      85 </span><span class="lineCov">          1 :                     std::size_t Size=::boost::distance(Range);</span>
<span class="lineNum">      86 </span><span class="lineCov">          1 :                     m_Size=Size;</span>
<span class="lineNum">      87 </span>            :                     set_value_type* Storage=0;
<span class="lineNum">      88 </span>            : 
<span class="lineNum">      89 </span><span class="lineCov">          1 :                     if(use_fixed_storage(m_Size))</span>
<span class="lineNum">      90 </span>            :                     {
<span class="lineNum">      91 </span>            :                         // Use fixed storage
<span class="lineNum">      92 </span><span class="lineCov">          1 :                         Storage=&amp;m_Storage.m_fixSet[0];</span>
<span class="lineNum">      93 </span>            :                     }
<span class="lineNum">      94 </span>            :                     else
<span class="lineNum">      95 </span>            :                     {
<span class="lineNum">      96 </span>            :                         // Use dynamic storage
<span class="lineNum">      97 </span><span class="lineNoCov">          0 :                         m_Storage.m_dynSet=new set_value_type[m_Size];</span>
<span class="lineNum">      98 </span>            :                         Storage=m_Storage.m_dynSet;
<span class="lineNum">      99 </span>            :                     }
<span class="lineNum">     100 </span>            : 
<span class="lineNum">     101 </span>            :                     // Use fixed storage
<span class="lineNum">     102 </span>            :                     ::std::copy(::boost::begin(Range), ::boost::end(Range), Storage);
<span class="lineNum">     103 </span><span class="lineCov">          1 :                     ::std::sort(Storage, Storage+m_Size);</span>
<span class="lineNum">     104 </span><span class="lineCov">          1 :                 }</span>
<a name="105"><span class="lineNum">     105 </span>            : </a>
<span class="lineNum">     106 </span>            :                 // Copy constructor
<span class="lineNum">     107 </span><span class="lineCov">         20 :                 is_any_ofF(const is_any_ofF&amp; Other) : m_Size(Other.m_Size)</span>
<span class="lineNum">     108 </span>            :                 {
<span class="lineNum">     109 </span>            :                     // Prepare storage
<span class="lineNum">     110 </span><span class="lineCov">         20 :                     m_Storage.m_dynSet=0;               </span>
<span class="lineNum">     111 </span>            :                     const set_value_type* SrcStorage=0;
<span class="lineNum">     112 </span>            :                     set_value_type* DestStorage=0;
<span class="lineNum">     113 </span>            : 
<span class="lineNum">     114 </span><span class="lineCov">         20 :                     if(use_fixed_storage(m_Size))</span>
<span class="lineNum">     115 </span>            :                     {
<span class="lineNum">     116 </span>            :                         // Use fixed storage
<span class="lineNum">     117 </span><span class="lineCov">         20 :                         DestStorage=&amp;m_Storage.m_fixSet[0];</span>
<span class="lineNum">     118 </span><span class="lineCov">         20 :                         SrcStorage=&amp;Other.m_Storage.m_fixSet[0];</span>
<span class="lineNum">     119 </span>            :                     }
<span class="lineNum">     120 </span>            :                     else
<span class="lineNum">     121 </span>            :                     {
<span class="lineNum">     122 </span>            :                         // Use dynamic storage
<span class="lineNum">     123 </span><span class="lineNoCov">          0 :                         m_Storage.m_dynSet=new set_value_type[m_Size];</span>
<span class="lineNum">     124 </span>            :                         DestStorage=m_Storage.m_dynSet;
<span class="lineNum">     125 </span><span class="lineNoCov">          0 :                         SrcStorage=Other.m_Storage.m_dynSet;</span>
<span class="lineNum">     126 </span>            :                     }
<span class="lineNum">     127 </span>            : 
<span class="lineNum">     128 </span>            :                     // Use fixed storage
<span class="lineNum">     129 </span><span class="lineCov">         20 :                     ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);</span>
<span class="lineNum">     130 </span><span class="lineCov">         20 :                 }</span>
<a name="131"><span class="lineNum">     131 </span>            : </a>
<span class="lineNum">     132 </span>            :                 // Destructor
<span class="lineNum">     133 </span><span class="lineCov">         21 :                 ~is_any_ofF()</span>
<span class="lineNum">     134 </span>            :                 {
<span class="lineNum">     135 </span><span class="lineCov">         21 :                     if(!use_fixed_storage(m_Size) &amp;&amp; m_Storage.m_dynSet!=0)</span>
<span class="lineNum">     136 </span>            :                     {
<span class="lineNum">     137 </span><span class="lineNoCov">          0 :                         delete [] m_Storage.m_dynSet;</span>
<span class="lineNum">     138 </span>            :                     }
<span class="lineNum">     139 </span><span class="lineCov">         21 :                 }</span>
<span class="lineNum">     140 </span>            : 
<span class="lineNum">     141 </span>            :                 // Assignment
<span class="lineNum">     142 </span>            :                 is_any_ofF&amp; operator=(const is_any_ofF&amp; Other)
<span class="lineNum">     143 </span>            :                 {
<span class="lineNum">     144 </span>            :                     // Handle self assignment
<span class="lineNum">     145 </span>            :                     if(this==&amp;Other) return *this;
<span class="lineNum">     146 </span>            : 
<span class="lineNum">     147 </span>            :                     // Prepare storage             
<span class="lineNum">     148 </span>            :                     const set_value_type* SrcStorage;
<span class="lineNum">     149 </span>            :                     set_value_type* DestStorage;
<span class="lineNum">     150 </span>            : 
<span class="lineNum">     151 </span>            :                     if(use_fixed_storage(Other.m_Size))
<span class="lineNum">     152 </span>            :                     {
<span class="lineNum">     153 </span>            :                         // Use fixed storage
<span class="lineNum">     154 </span>            :                         DestStorage=&amp;m_Storage.m_fixSet[0];
<span class="lineNum">     155 </span>            :                         SrcStorage=&amp;Other.m_Storage.m_fixSet[0];
<span class="lineNum">     156 </span>            : 
<span class="lineNum">     157 </span>            :                         // Delete old storage if was present
<span class="lineNum">     158 </span>            :                         if(!use_fixed_storage(m_Size) &amp;&amp; m_Storage.m_dynSet!=0)
<span class="lineNum">     159 </span>            :                         {
<span class="lineNum">     160 </span>            :                             delete [] m_Storage.m_dynSet;
<span class="lineNum">     161 </span>            :                         }
<span class="lineNum">     162 </span>            : 
<span class="lineNum">     163 </span>            :                         // Set new size
<span class="lineNum">     164 </span>            :                         m_Size=Other.m_Size;
<span class="lineNum">     165 </span>            :                     }
<span class="lineNum">     166 </span>            :                     else
<span class="lineNum">     167 </span>            :                     {
<span class="lineNum">     168 </span>            :                         // Other uses dynamic storage
<span class="lineNum">     169 </span>            :                         SrcStorage=Other.m_Storage.m_dynSet;
<span class="lineNum">     170 </span>            : 
<span class="lineNum">     171 </span>            :                         // Check what kind of storage are we using right now
<span class="lineNum">     172 </span>            :                         if(use_fixed_storage(m_Size))
<span class="lineNum">     173 </span>            :                         {
<span class="lineNum">     174 </span>            :                             // Using fixed storage, allocate new
<span class="lineNum">     175 </span>            :                             set_value_type* pTemp=new set_value_type[Other.m_Size];
<span class="lineNum">     176 </span>            :                             DestStorage=pTemp;
<span class="lineNum">     177 </span>            :                             m_Storage.m_dynSet=pTemp;
<span class="lineNum">     178 </span>            :                             m_Size=Other.m_Size;
<span class="lineNum">     179 </span>            :                         }
<span class="lineNum">     180 </span>            :                         else
<span class="lineNum">     181 </span>            :                         {
<span class="lineNum">     182 </span>            :                             // Using dynamic storage, check if can reuse
<span class="lineNum">     183 </span>            :                             if(m_Storage.m_dynSet!=0 &amp;&amp; m_Size&gt;=Other.m_Size &amp;&amp; m_Size&lt;Other.m_Size*2)
<span class="lineNum">     184 </span>            :                             {
<span class="lineNum">     185 </span>            :                                 // Reuse the current storage
<span class="lineNum">     186 </span>            :                                 DestStorage=m_Storage.m_dynSet;
<span class="lineNum">     187 </span>            :                                 m_Size=Other.m_Size;
<span class="lineNum">     188 </span>            :                             }
<span class="lineNum">     189 </span>            :                             else
<span class="lineNum">     190 </span>            :                             {
<span class="lineNum">     191 </span>            :                                 // Allocate the new one
<span class="lineNum">     192 </span>            :                                 set_value_type* pTemp=new set_value_type[Other.m_Size];
<span class="lineNum">     193 </span>            :                                 DestStorage=pTemp;
<span class="lineNum">     194 </span>            :                         
<span class="lineNum">     195 </span>            :                                 // Delete old storage if necessary
<span class="lineNum">     196 </span>            :                                 if(m_Storage.m_dynSet!=0)
<span class="lineNum">     197 </span>            :                                 {
<span class="lineNum">     198 </span>            :                                     delete [] m_Storage.m_dynSet;
<span class="lineNum">     199 </span>            :                                 }
<span class="lineNum">     200 </span>            :                                 // Store the new storage
<span class="lineNum">     201 </span>            :                                 m_Storage.m_dynSet=pTemp;
<span class="lineNum">     202 </span>            :                                 // Set new size
<span class="lineNum">     203 </span>            :                                 m_Size=Other.m_Size;
<span class="lineNum">     204 </span>            :                             }
<span class="lineNum">     205 </span>            :                         }
<span class="lineNum">     206 </span>            :                     }
<span class="lineNum">     207 </span>            : 
<span class="lineNum">     208 </span>            :                     // Copy the data
<span class="lineNum">     209 </span>            :                     ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);
<span class="lineNum">     210 </span>            : 
<span class="lineNum">     211 </span>            :                     return *this;
<span class="lineNum">     212 </span>            :                 }
<span class="lineNum">     213 </span>            : 
<a name="214"><span class="lineNum">     214 </span>            :                 // Operation</a>
<span class="lineNum">     215 </span>            :                 template&lt;typename Char2T&gt;
<span class="lineNum">     216 </span><span class="lineNoCov">          0 :                 bool operator()( Char2T Ch ) const</span>
<span class="lineNum">     217 </span>            :                 {
<span class="lineNum">     218 </span>            :                     const set_value_type* Storage=
<span class="lineNum">     219 </span><span class="lineNoCov">          0 :                         (use_fixed_storage(m_Size))</span>
<span class="lineNum">     220 </span>            :                         ? &amp;m_Storage.m_fixSet[0]
<span class="lineNum">     221 </span><span class="lineNoCov">          0 :                         : m_Storage.m_dynSet;</span>
<span class="lineNum">     222 </span>            : 
<span class="lineNum">     223 </span><span class="lineNoCov">          0 :                     return ::std::binary_search(Storage, Storage+m_Size, Ch);</span>
<span class="lineNum">     224 </span>            :                 }
<span class="lineNum">     225 </span>            :             private:
<span class="lineNum">     226 </span>            :                 // check if the size is eligible for fixed storage
<span class="lineNum">     227 </span>            :                 static bool use_fixed_storage(std::size_t size)
<span class="lineNum">     228 </span>            :                 {
<span class="lineNum">     229 </span>            :                     return size&lt;=sizeof(set_value_type*)*2;
<span class="lineNum">     230 </span>            :                 }
<span class="lineNum">     231 </span>            : 
<span class="lineNum">     232 </span>            : 
<span class="lineNum">     233 </span>            :             private:
<span class="lineNum">     234 </span>            :                 // storage
<span class="lineNum">     235 </span>            :                 // The actual used storage is selected on the type
<span class="lineNum">     236 </span>            :                 union
<span class="lineNum">     237 </span>            :                 {
<span class="lineNum">     238 </span>            :                     set_value_type* m_dynSet;
<span class="lineNum">     239 </span>            :                     set_value_type m_fixSet[sizeof(set_value_type*)*2];
<span class="lineNum">     240 </span>            :                 } 
<span class="lineNum">     241 </span>            :                 m_Storage;
<span class="lineNum">     242 </span>            :         
<span class="lineNum">     243 </span>            :                 // storage size
<span class="lineNum">     244 </span>            :                 ::std::size_t m_Size;
<span class="lineNum">     245 </span>            :             };
<span class="lineNum">     246 </span>            : 
<span class="lineNum">     247 </span>            :             // is_from_range functor
<span class="lineNum">     248 </span>            :             /*
<span class="lineNum">     249 </span>            :                 returns true if the value is from the specified range.
<span class="lineNum">     250 </span>            :                 (i.e. x&gt;=From &amp;&amp; x&gt;=To)
<span class="lineNum">     251 </span>            :             */
<span class="lineNum">     252 </span>            :             template&lt;typename CharT&gt;
<span class="lineNum">     253 </span>            :             struct is_from_rangeF :
<span class="lineNum">     254 </span>            :                 public predicate_facade&lt; is_from_rangeF&lt;CharT&gt; &gt;
<span class="lineNum">     255 </span>            :             {
<span class="lineNum">     256 </span>            :                 // Boost.ResultOf support
<span class="lineNum">     257 </span>            :                 typedef bool result_type;
<span class="lineNum">     258 </span>            : 
<span class="lineNum">     259 </span>            :                 // Constructor
<span class="lineNum">     260 </span>            :                 is_from_rangeF( CharT From, CharT To ) : m_From(From), m_To(To) {}
<span class="lineNum">     261 </span>            : 
<span class="lineNum">     262 </span>            :                 // Operation
<span class="lineNum">     263 </span>            :                 template&lt;typename Char2T&gt;
<span class="lineNum">     264 </span>            :                 bool operator()( Char2T Ch ) const
<span class="lineNum">     265 </span>            :                 {
<span class="lineNum">     266 </span>            :                     return ( m_From &lt;= Ch ) &amp;&amp; ( Ch &lt;= m_To );
<span class="lineNum">     267 </span>            :                 }
<span class="lineNum">     268 </span>            : 
<span class="lineNum">     269 </span>            :             private:
<span class="lineNum">     270 </span>            :                 CharT m_From;
<span class="lineNum">     271 </span>            :                 CharT m_To;
<span class="lineNum">     272 </span>            :             };
<span class="lineNum">     273 </span>            : 
<span class="lineNum">     274 </span>            :             // class_and composition predicate
<span class="lineNum">     275 </span>            :             template&lt;typename Pred1T, typename Pred2T&gt;
<span class="lineNum">     276 </span>            :             struct pred_andF :
<span class="lineNum">     277 </span>            :                 public predicate_facade&lt; pred_andF&lt;Pred1T,Pred2T&gt; &gt;
<span class="lineNum">     278 </span>            :             {
<span class="lineNum">     279 </span>            :             public:
<span class="lineNum">     280 </span>            : 
<span class="lineNum">     281 </span>            :                 // Boost.ResultOf support
<span class="lineNum">     282 </span>            :                 typedef bool result_type;
<span class="lineNum">     283 </span>            : 
<span class="lineNum">     284 </span>            :                 // Constructor
<span class="lineNum">     285 </span>            :                 pred_andF( Pred1T Pred1, Pred2T Pred2 ) :
<span class="lineNum">     286 </span>            :                     m_Pred1(Pred1), m_Pred2(Pred2) {}
<span class="lineNum">     287 </span>            : 
<span class="lineNum">     288 </span>            :                 // Operation
<span class="lineNum">     289 </span>            :                 template&lt;typename CharT&gt;
<span class="lineNum">     290 </span>            :                 bool operator()( CharT Ch ) const
<span class="lineNum">     291 </span>            :                 {
<span class="lineNum">     292 </span>            :                     return m_Pred1(Ch) &amp;&amp; m_Pred2(Ch);
<span class="lineNum">     293 </span>            :                 }
<span class="lineNum">     294 </span>            : 
<span class="lineNum">     295 </span>            :             private:
<span class="lineNum">     296 </span>            :                 Pred1T m_Pred1;
<span class="lineNum">     297 </span>            :                 Pred2T m_Pred2;
<span class="lineNum">     298 </span>            :             };
<span class="lineNum">     299 </span>            : 
<span class="lineNum">     300 </span>            :             // class_or composition predicate
<span class="lineNum">     301 </span>            :             template&lt;typename Pred1T, typename Pred2T&gt;
<span class="lineNum">     302 </span>            :             struct pred_orF :
<span class="lineNum">     303 </span>            :                 public predicate_facade&lt; pred_orF&lt;Pred1T,Pred2T&gt; &gt;
<span class="lineNum">     304 </span>            :             {
<span class="lineNum">     305 </span>            :             public:
<span class="lineNum">     306 </span>            :                 // Boost.ResultOf support
<span class="lineNum">     307 </span>            :                 typedef bool result_type;
<span class="lineNum">     308 </span>            : 
<span class="lineNum">     309 </span>            :                 // Constructor
<span class="lineNum">     310 </span>            :                 pred_orF( Pred1T Pred1, Pred2T Pred2 ) :
<span class="lineNum">     311 </span>            :                     m_Pred1(Pred1), m_Pred2(Pred2) {}
<span class="lineNum">     312 </span>            : 
<span class="lineNum">     313 </span>            :                 // Operation
<span class="lineNum">     314 </span>            :                 template&lt;typename CharT&gt;
<span class="lineNum">     315 </span>            :                 bool operator()( CharT Ch ) const
<span class="lineNum">     316 </span>            :                 {
<span class="lineNum">     317 </span>            :                     return m_Pred1(Ch) || m_Pred2(Ch);
<span class="lineNum">     318 </span>            :                 }
<span class="lineNum">     319 </span>            : 
<span class="lineNum">     320 </span>            :             private:
<span class="lineNum">     321 </span>            :                 Pred1T m_Pred1;
<span class="lineNum">     322 </span>            :                 Pred2T m_Pred2;
<span class="lineNum">     323 </span>            :             };
<span class="lineNum">     324 </span>            : 
<span class="lineNum">     325 </span>            :             // class_not composition predicate
<span class="lineNum">     326 </span>            :             template&lt; typename PredT &gt;
<span class="lineNum">     327 </span>            :             struct pred_notF :
<span class="lineNum">     328 </span>            :                 public predicate_facade&lt; pred_notF&lt;PredT&gt; &gt;
<span class="lineNum">     329 </span>            :             {
<span class="lineNum">     330 </span>            :             public:
<span class="lineNum">     331 </span>            :                 // Boost.ResultOf support
<span class="lineNum">     332 </span>            :                 typedef bool result_type;
<span class="lineNum">     333 </span>            : 
<span class="lineNum">     334 </span>            :                 // Constructor
<span class="lineNum">     335 </span>            :                 pred_notF( PredT Pred ) : m_Pred(Pred) {}
<span class="lineNum">     336 </span>            : 
<span class="lineNum">     337 </span>            :                 // Operation
<span class="lineNum">     338 </span>            :                 template&lt;typename CharT&gt;
<span class="lineNum">     339 </span>            :                 bool operator()( CharT Ch ) const
<span class="lineNum">     340 </span>            :                 {
<span class="lineNum">     341 </span>            :                     return !m_Pred(Ch);
<span class="lineNum">     342 </span>            :                 }
<span class="lineNum">     343 </span>            : 
<span class="lineNum">     344 </span>            :             private:
<span class="lineNum">     345 </span>            :                 PredT m_Pred;
<span class="lineNum">     346 </span>            :             };
<span class="lineNum">     347 </span>            : 
<span class="lineNum">     348 </span>            :         } // namespace detail
<span class="lineNum">     349 </span>            :     } // namespace algorithm
<span class="lineNum">     350 </span>            : } // namespace boost
<span class="lineNum">     351 </span>            : 
<span class="lineNum">     352 </span>            : 
<span class="lineNum">     353 </span>            : #endif  // BOOST_STRING_CLASSIFICATION_DETAIL_HPP
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
